package com.pphh.demo;

import com.alibaba.dubbo.config.annotation.Service;
import com.pphh.demo.common.service.SimpleService;
import com.pphh.demo.common.service.UserEntity;
import lombok.extern.slf4j.Slf4j;

import java.util.Date;
import java.util.List;

@Service
@Slf4j
public class SimpleServiceImpl implements SimpleService {

    @Override
    public String hello(int i, String[] strs, List<String> strList) {
        return "hello, this is greetings from demo-rpc-service, time = " + new Date();
    }

    @Override
    public int save(UserEntity user) {
        return 0;
    }

    @Override
    public int test(UserEntity user) throws Exception {
        throw new Exception("this is a test exception");
    }

}
